package com.pojo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Objects;

public class Pro {

    private Integer id;
    private Integer manId;
    private String name;
    private BigDecimal price;
    private String img;
    private String description;
    private Integer stock;
    private String state;

    private String manufacturerName;

    public Pro() {
    }

    public Pro(Integer id, Integer manId, String name, BigDecimal price, String img, String description, Integer stock, String state, String manufacturerName) {
        this.id = id;
        this.manId = manId;
        this.name = name;
        this.price = price;
        this.img = img;
        this.description = description;
        this.stock = stock;
        this.state = state;
        this.manufacturerName = manufacturerName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getManId() {
        return manId;
    }

    public void setManId(Integer manId) {
        this.manId = manId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getManufacturerName() {
        return manufacturerName;
    }

    public void setManufacturerName(String manufacturerName) {
        this.manufacturerName = manufacturerName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Pro pro = (Pro) o;
        return Objects.equals(id, pro.id) && Objects.equals(manId, pro.manId) && Objects.equals(name, pro.name) && Objects.equals(price, pro.price) && Objects.equals(img, pro.img) && Objects.equals(description, pro.description) && Objects.equals(stock, pro.stock) && Objects.equals(state, pro.state) && Objects.equals(manufacturerName, pro.manufacturerName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, manId, name, price, img, description, stock, state, manufacturerName);
    }

    @Override
    public String toString() {
        return "Pro{" +
                "id=" + id +
                ", manId=" + manId +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", img='" + img + '\'' +
                ", description='" + description + '\'' +
                ", stock=" + stock +
                ", state='" + state + '\'' +
                ", manufacturerName='" + manufacturerName + '\'' +
                '}';
    }
}
